<?php

namespace app\common\validate\Subject;

use think\Validate;

// 课程分类的验证器
class Category extends Validate
{
  /**
   * 验证规则
   */
  protected $rule = [
    'name'   => ['require', 'unique:subject_category'],

  ];


  /**
   * 提示消息
   */
  protected $message = [
    'name.require' => '课程分类名称必填',
    'name.unique' => '课程分类已存在'
  ];
  /**
   * 验证场景
   */
  protected $scene = [];
}
